/* 重置一些默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  height: 100vh; /* 高度撑满屏幕 */
  overflow-x: hidden; /* 禁止横向滚动条 */
}

/* 顶部导航栏 */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  font-size: 1.5rem;
}

.navbar h1 {
  font-size: 1.2rem;
  margin: 0;
  flex-grow: 1;
  text-align: center;
}

.navbar .user-info {
  display: flex;
  align-items: center;
}

.navbar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.navbar .logout-btn {
  padding: 8px 15px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.navbar .logout-btn:hover {
  background-color: #c0392b;
}

/* 侧边导航栏 */
.sidebar {
  width: 250px;
  height: 100vh;
  padding-top: 20px;
  position: fixed; /* 固定在左侧 */
  top: 0;
  left: 0;
  bottom: 0;
  background-color: #34495e;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin: 15px 0;
}

.sidebar ul li a {
  display: block;
  padding: 10px 20px;
  color: white;
  text-decoration: none;
}

.sidebar ul li a:hover {
  background-color: #2c3e50;
}

/* 主内容区域 */
main {
  margin-left: 250px; /* 留出左侧边栏的空间 */
  margin-right: 250px; /* 留出右侧边栏的空间 */
  padding: 20px;
  flex-grow: 1;
  background-color: #fff;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

#unit-details {
  padding: 20px;
  background-color: #ecf0f1;
  border-radius: 8px;
}

#unit-details video {
  width: 100%;
  height: auto;
  margin-top: 20px;
}

#unit-buttons button {
  margin: 10px;
}

#unit-documents a {
  color: #3498db;
}

#unit-documents a:hover {
  text-decoration: underline;
}

/* 右侧边栏 */
.right-sidebar {
  width: 250px;
  height: 100vh;
  position: fixed; /* 固定在右侧 */
  top: 0;
  right: 0;
  bottom: 0;
  background-color: #34495e;
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.right-sidebar p {
  font-size: 1rem;
  margin-top: 20px;
}

/* 底部信息 */
footer.footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 10px 0;
  margin-top: auto;
}

footer.footer a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
}

footer.footer a:hover {
  text-decoration: underline;
}
